#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>

bool isPalindrome(int x)
{
	if (x < 0 || x % 10 == 0 && x != 0)
		return false;
	int reversedhalf = 0;
	while (x < reversedhalf)
	{
		reversedhalf = reversedhalf * 10 + reversedhalf % 10;
		x /= 10;
	}
	if (x == reversedhalf || x == reversedhalf)
		return true;
	else
		return false;
}

int main()
{
	int n = 0;
	scanf("%d", &n);
	isPalindrome(n);
	return 0;
}